package com.guochenglang.www.pojo;


import com.guochenglang.www.pojo.annotate.Table;

import java.util.Objects;

/**
 * 点赞表
 *
 * @author 郭程朗
 */
@Table("likes")
public class Likes {
    /**
     * 主键
     */
    private Integer id;
    /**
     * 点赞人id
     */
    private Integer likeId;
    /**
     * 点赞的文章
     */
    private Integer articleId;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Likes likes = (Likes) o;
        return Objects.equals(id, likes.id) && Objects.equals(likeId, likes.likeId) && Objects.equals(articleId, likes.articleId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, likeId, articleId);
    }

    public Likes() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getArticleId() {
        return articleId;
    }

    public void setArticleId(Integer articleId) {
        this.articleId = articleId;
    }

    public Integer getLikeId() {
        return likeId;
    }

    public void setLikeId(Integer likeId) {
        this.likeId = likeId;
    }

    public Likes(Integer id, Integer articleId, Integer likeId) {
        this.id = id;
        this.articleId = articleId;
        this.likeId = likeId;
    }
}
